import {baseUrl} from "@/config/env";

export default () => {
    return {
        submitText: '修改',
        size: 'small',
        labelWidth: 120,
        index: true,
        indexLabel: "序号",
        menuAlign: 'center',
        menuPosition: "right",
        searchIndex: 1,
        searchIcon: true,
        permissionBtn: {
            addBtn: 'sys:sysDeptJob:add',
            editBtn: 'sys:sysDeptJob:edit',
            viewBtn: 'sys:sysDeptJob:info',
            delBtn: 'sys:sysDeptJob:delete',
        },
        column: [{
            "addDisplay": false,
            "editDisplay": false,
            "label": "职务id",
            "prop": "id",
            "hide": true,
            "type": "input"
        },
            {
                label: '所属机构',
                span: 12,
                prop: 'deptId',
                type: "tree",
                search: true,
                dicUrl: baseUrl + "/start/sysDept/listTree",
                props: {
                    label: "name",
                    value: "id",
                }
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "职务名称",
                "prop": "name",
                "showColumn": true,
                "type": "input"
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "职务类型",
                "prop": "jobType",
                "showColumn": true,
                "type": "select",
                dicUrl: baseUrl + "/start/sysDictionaryItem/listByDictionaryCode",
                dicMethod: "get",
                dicQuery: {code: "dept_job_type"},
                props: {
                    label: 'name',
                    value: 'dictionaryValue',
                },
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "创建时间",
                "prop": "createTime",
                "hide": true,
                "type": "datetime"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "创建人",
                "prop": "createBy",
                "hide": true,
                "type": "input"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "修改时间",
                "prop": "updateTime",
                "hide": true,
                "type": "datetime"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "修改人",
                "prop": "updateBy",
                "hide": true,
                "type": "input"
            }]

    }
}
